#!/bin/sh
#
# $OpenBSD: puppetboard.rc,v 1.6 2016/11/02 09:01:13 danj Exp $

daemon="puppetboard_wsgi"
daemon_flags="--workers 4"
daemon_user="_puppetboard"

. /etc/rc.d/rc.subr

pexp="${MODPY_BIN}.*${daemon_flags:+ ${daemon_flags}} ${daemon}:application"

rc_start() {
	${rcexec} "cd ${INSTDIR} && \
		${LOCALBASE}/bin/gunicorn${MODPY_BIN_SUFFIX} --daemon ${daemon_flags} ${daemon}:application"
}

rc_cmd $1
